<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <title>${metadata.alias!}</title>
        <@tools.includePlace path="/common/8ddab9ba-a8aa-4745-86c6-66bf1c2c976c.html"/> <#-- header -->
    </head>
    <body>
        <@tools.includePlace path="/common/c32a4f4a-ff5d-49cf-bb59-5d9784539174.html"/> <#-- 导航 -->

        <div class="container">
            <div class="row gx-5 justify-content-between my-5">
                <@tools.includePlace path="/c936c718-5f19-426f-b3ff-13a5a8d63044.html"/> <#-- 个人中心导航 -->
                <div class="col-md-9">
                    <div class="ps-4">
                        <h3>展示您的成果，有助于吸引更多的客户！</h3>
                        <@import path="ftl/tools.ftl" namespace="t"/>

                        <#if error?has_content>
                            <p style="color:red"><@t.m error/></p>
                        </#if>

                        <#if result?has_content&&!error?has_content>
                            <p style="color:red">提交成功，请等待管理员审核！</p>
                        <#else>
                            <form method="post" action="${site.dynamicPath}content/save" onsubmit="return check();">
                                <input type="hidden" name="_csrf" value="<@tools.csrfToken/>"/>
                                <input name="returnUrl" type="hidden" value="${site.dynamicPath}member/case.html?result=true" />
                                <input name="categoryId" type="hidden" value="19"/>
                                <input name="modelId" type="hidden" value="article"/>
                                <input name="author" type="hidden" value="${(user.nickname)!}"/>
                                <p><label class="input-label">案例名:</label><input name="title" type="text" size="30" maxlength="255"/></p>
                                <p><label class="input-label">案例介绍:</label><textarea name="text" style="width:60%;height:200px;"></textarea></p>
                                <p>
                                    <label class="input-label">建设单位名:</label>
                                    <input name="categoryExtendDataList[0].name" type="hidden" value="builder"/>
                                    <input name="categoryExtendDataList[0].value" type="text" size="30" value=""/>
                                </p>
                                <p>
                                    <label class="input-label">显示建设单位:</label>
                                    <input name="categoryExtendDataList[1].name" type="hidden" value="show"/>
                                    <select class="combox" name="categoryExtendDataList[1].value">
                                        <option value="true">是</option>
                                        <option value="false" selected="true">否</option>
                                    </select>
                                </p>
                                <p><input class="btn btn-primary" type="submit" value="提交"/></p>
                            </form>
                        </#if>

                        <#if user?has_content>
                            <@cms.contentList categoryId=19 advanced=true userId=user.id>
                                <#list page.list as a>
                                    <p>[<@t.m 'page.status.content.'+a.status/>]${(a.title)!}  (${a.clicks!}) </p>
                                </#list>
                            </@cms.contentList>
                        </#if>
                    </div>
                </div>
            </div>
        </div>
		<script>
			var itemString="itemType=category&itemId=19";
			var templatePath='${.current_template_name?keep_after('/')}';
		</script>
        <@tools.includePlace path="/footer/7f8bacb5-30ca-4641-b66f-987d447b1a85.html"/> <#-- footer -->
        <script>
            $(function(){$('.login-form input').eq(0).focus();});
            function check(){
                if(!$('input[name=title]').val()||!$('textarea[name=text]').val()){
                    alert('案例名和案例网址不能为空');
                    return false;
                }
                return true;
            }
        </script>
    </body>
</html>
